package health_system.health_system.dto;

import health_system.health_system.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserSummaryDTO {
    private Long id;
    private String username;
    private String fullName;
    private String avatarUrl;
//    private User.UserRole role;
    
    public static UserSummaryDTO fromUser(User user) {
        if (user == null) return null;
        
        return UserSummaryDTO.builder()
                .id(user.getId())
                .username(user.getUsername())
                .fullName(user.getFullName())
                .avatarUrl(user.getAvatarUrl())
//                .role(user.getRole())
                .build();
    }
} 